package com.tengju.user.infrastructure.repository.convert;

import com.tengju.user.domain.model.user.ManageUser;
import com.tengju.user.domain.model.user.StaffId;
import com.tengju.user.infrastructure.persistence.mybatis.dataobject.SysUserDO;

public class ManageUserConvert {

    public static ManageUser convertSysUserToEntity(SysUserDO sysUserDO) {
        if (null == sysUserDO) {
            return null;
        }
        return new ManageUser(
                new StaffId(sysUserDO.getId()),
                sysUserDO.getUsername(),
                sysUserDO.getPassword(),
                sysUserDO.getRealName(),
                sysUserDO.getCreateBy(),
                sysUserDO.getUpdateBy(),
                null
                );
    }
}
